package com.yuan.yblog.crud.entity;

import java.io.Serial;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
* @author hepeiyuan
* @date 2024-06-04
*/
@Data
@TableName("user_message")
@Schema(description = "用户消息表")
public class UserMessage implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "发送消息的用户ID")
    private Long fromUserId;

    @Schema(description = "接收消息的用户ID")
    private Long toUserId;

    @Schema(description = "消息可能关联的帖子")
    private Long postId;

    @Schema(description = "消息可能关联的评论")
    private Long commentId;

    @Schema(description = "内容")
    private String content;

    @Schema(description = "消息类型")
    private Long messageType;

    @Schema(description = "创建时间")
    private Date created;

    @Schema(description = "修改时间")
    private Date modified;

    @Schema(description = "状态，0删除，1未读，2已读")
    private Integer status;

}